/* 蓝色暗色主题 */
:root {
    --bg-primary: #0d0d0f;
    --bg-secondary: #172860;
    --bg-tertiary: #334980;
    --text-primary: #d8f2fa;
    --text-secondary: #8aa6d4;
    --accent-primary: #084d91;
    --accent-gradient: linear-gradient(135deg, #127eea, #48c5ff);
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --border-radius: 12px;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top right, #132f4c, #0a1929);
}

.login-card {
    background-color: rgb(43, 65, 120);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    font-size: 2rem;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* 主页面样式 */
header {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.card h2 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* 表单样式 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 1px solid var(--bg-tertiary);
    border-radius: 8px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.form-group input::placeholder {
    color: rgba(168, 199, 250, 0.5);
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* 按钮样式 */
.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--bg-tertiary);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

/* 结果区域样式 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.result-item.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* 风险指示器 */
.risk-indicator {
    margin-top: 0.5rem;
}

.risk-bar {
    height: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.risk-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 0.8s ease;
}

.risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.risk-conclusion {
    padding: 1.25rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* 消息和状态 */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-weight: 500;
}

.message.error {
    background-color: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: var(--danger);
}

.message.success {
    background-color: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: var(--success);
}

.hidden {
    display: none;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card,
    .card {
        padding: 1.5rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}